package com.zhongxiangspace.mapper;

import com.zhongxiangspace.entity.BuildingsAttribute;
import com.zhongxiangspace.entity.OfficeBuildings;
import com.zhongxiangspace.entity.QueryAnalyzer;
import com.zhongxiangspace.entity.VO.OfficeBHVO;
import com.zhongxiangspace.entity.VO.QueryAnalyzerOffice;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 办公楼
 */
public interface OfficeBuildingMapper {
    /**
     * 插入data
     *
     * @param officeBuildings
     * @return
     */
    boolean insert(OfficeBuildings officeBuildings);

    /**
     * 获取data
     *
     * @param queryAnalyzer 条件
     * @return
     */
    List<OfficeBuildings> queryByQueryAnalyzer(QueryAnalyzer queryAnalyzer);

    /**
     * 获取单条data
     *
     * @param id
     * @return
     */
    OfficeBuildings queryOne(@Param("id") Integer id);

    /**
     * 更改状态
     *
     * @param officeBuildings 上下线
     * @return
     */
    boolean updataStatusCode(OfficeBuildings officeBuildings);

    /**
     * 更改状态
     *
     * @param officeBuildings 热门和非热门
     * @return
     */
    boolean updataHotCode(OfficeBuildings officeBuildings);

    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    boolean delete(Integer id);

    /**
     * 更新data
     *
     * @param office
     * @return
     */
    boolean updata(OfficeBuildings office);

    /**
     * 查询楼盘属性
     *
     * @param building_id 楼盘id
     * @return
     */
    BuildingsAttribute queryAttr(@Param("building_id") Integer building_id);

    /**
     * 更新楼盘data
     * @param buildingsAttribute 属性
     * @return
     */
    boolean updataAttr(BuildingsAttribute buildingsAttribute);

    /**
     *插入楼盘data
     * @param buildingsAttribute 属性
     * @return
     */
    boolean insertAttr(BuildingsAttribute buildingsAttribute);

    /**
     * 查询楼盘
     * @param buildingQueryAnalyzer
     * @return
     */
    List<Map<String,Object>> queryOfficeBuilding(QueryAnalyzer buildingQueryAnalyzer);

    /**
     * 列表也数据
     * @param queryAnalyzerOffice
     * @return
     */
    List<OfficeBHVO> queryOfficeBH(QueryAnalyzerOffice queryAnalyzerOffice);

    /**
     * 地图获取楼盘
     * @param queryAnalyzerNmapVO
     * @return
     */
    List<OfficeBHVO> queryOfficeByLatLon(QueryAnalyzerOffice queryAnalyzerNmapVO);
}
